package org.jjche.sys.modules.fillrule.api;

import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.jjche.core.base.BaseController;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 系统编码规则服务,对内
 * </p>
 *
 * @author miaoyj
 * @since 2024-03-25
 */
@Api(tags = "系统编码规则")
@ApiSupport(order = 1, author = "miaoyj")
@RestController
@RequestMapping("/internal/fill_rules")
@RequiredArgsConstructor
public class SysFillRuleApiController extends BaseController {

    private final SysFillRuleApi fillRuleApi;
    /**
     * <p>
     * 生成编码
     * </p>
     *
     * @return /
     */
    @PostMapping("execute")
    public String executeRule(@RequestParam String ruleCode, @RequestBody Map<String, Object> formData){
        return fillRuleApi.executeRule(ruleCode, formData);
    }
}
